package com.wangzaiplus.test.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;

import java.io.Serializable;

/**
 * @ClassName RedisLimiterHelper
 * @Description: TODO
 * @Author wgc
 * @Date 2020/04/15 9:42
 * @Version V1.0
 **/
/*
@Configuration
public class RedisLimiterHelper {
    @Bean
     public RedisTemplate<String, Serializable> limitRedisTemplate(LettuceConnectionFactory redisConnectionFactory) {
                RedisTemplate<String, Serializable> template = new RedisTemplate<>();
                 template.setKeySerializer(new StringRedisSerializer());
                 template.setValueSerializer(new GenericJackson2JsonRedisSerializer());
                template.setConnectionFactory(redisConnectionFactory);
                 return template;
    }
}
*/
